﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using System.Data.Entity.Infrastructure;
using DLM.Domain.Model;

namespace DLM.Data.EF.CodeFirst.Mapping
{
    public class BonusCalculateStepMap : EntityTypeConfiguration<BonusCalculateStep>
    {
        public BonusCalculateStepMap()
        {
            this.HasKey(t => t.BCID);
            this.ToTable("BonusCalculateStep");
            this.Property(t => t.BCID).HasColumnName("BCID");
            this.Property(t => t.PartyID).HasColumnName("PartyID").IsRequired();
            this.Property(t => t.UserID).HasColumnName("UserID").IsRequired();
            this.Property(t => t.PartyStatus).HasColumnName("PartyStatus").IsRequired();
            this.Property(t => t.IsSuccess).HasColumnName("IsSuccess").IsRequired();
            this.Property(t => t.Step).HasColumnName("Step").IsUnicode(false).HasMaxLength(25);
            this.Property(t => t.OriginalBonus).HasColumnName("OriginalBonus");
            this.Property(t => t.Deduct).HasColumnName("Deduct");
            this.Property(t => t.CreateDate).HasColumnName("CreateDate");
        }
    }
}
